package designpattern.staticfactorypattern;

/**
 * @author hubb
 * @Date 2019/3/28 23:47
 */
public class StaticFactoryPatternDemo {
    public static void main(String[] args) {
        Login login1 = LoginEnum.getLoginEnum("password");
        Login login2 = LoginEnum.getLoginEnum("password");
        System.out.println(login1 == login2);

        Login login3 = LoginManager.factory("password");
        Login login4 = LoginManager.factory("password");
        System.out.println(login3 == login4);
    }
}
